#!/bin/sh
# centos7 安装python3脚本
# use > sh installPy3.sh
yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y\
&& cd /usr/local/src\
&& wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz\
&& tar -xvJf Python-3.6.5.tar.xz\
&& cd Python-3.6.5\
&& ./configure prefix=/usr/local/python3\
&& make\
&& make install\
&& ln -s /usr/local/python3/bin/python3 /usr/bin/python3\
&& cd /usr/local/src\
&& rm -rf Python*\
&& python3 -m pip install -U pip \
&& python3 -m pip list